<?php
header("content-type:text/html;charset=utf-8");
date_default_timezone_set('PRC');

$result = $_POST['checkbox'];
$tel = $_POST['tel'];
$winnum = $_POST['winnum'];
$time = time();
$sign=0;

require("connu.inc.php");

	
foreach($result as $res)
{
if($res==1)
{
	$update = "UPDATE userinfo SET whether='$res',recivetime='$time' WHERE tel='$tel' AND winnum='$winnum'";
	$r = mysql_query($update);
	$sign=1;
	
}
}
if($sign==0)
{
echo '<script>alert("领取失败!请重新领取！原因：未勾选！");location.href="slctel.html"</script>';
}
if($sign==1)
{
echo '<script>alert("已成功领取!");location.href="slctel.html"</script>';

}











?>